if !instance_exists(argument0) exit;
view_xview[1]=fix_x(argument0.x)-view_wview[1]/2;
view_yview[1]=fix_y(argument0.y)-view_hview[1]/2;
xmax=w-view_wview[1]+sx;
ymax=h-view_hview[1]+sy;
xmin=sx;
ymin=sy;

if view_xview[1]>xmax view_xview[1]=xmax
if view_xview[1]<xmin view_xview[1]=xmin
if view_yview[1]>ymax view_yview[1]=ymax
if view_yview[1]<ymin view_yview[1]=ymin

